/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.orderoid.ejb.domain;

import java.io.Serializable;
import java.util.Collection;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author Dahlia
 */
@Entity
@Table(name = "type_employe")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "TypeEmploye.findAll", query = "SELECT t FROM TypeEmploye t"),
    @NamedQuery(name = "TypeEmploye.findByIdTypeEmploye", query = "SELECT t FROM TypeEmploye t WHERE t.idTypeEmploye = :idTypeEmploye"),
    @NamedQuery(name = "TypeEmploye.findByLibelle", query = "SELECT t FROM TypeEmploye t WHERE t.libelle = :libelle")})
public class TypeEmploye implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id_type_employe")
    private Integer idTypeEmploye;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 100)
    @Column(name = "libelle")
    private String libelle;

    public TypeEmploye() {
    }

    public TypeEmploye(Integer idTypeEmploye) {
        this.idTypeEmploye = idTypeEmploye;
    }

    public TypeEmploye(Integer idTypeEmploye, String libelle) {
        this.idTypeEmploye = idTypeEmploye;
        this.libelle = libelle;
    }

    public Integer getIdTypeEmploye() {
        return idTypeEmploye;
    }

    public void setIdTypeEmploye(Integer idTypeEmploye) {
        this.idTypeEmploye = idTypeEmploye;
    }

    public String getLibelle() {
        return libelle;
    }

    public void setLibelle(String libelle) {
        this.libelle = libelle;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idTypeEmploye != null ? idTypeEmploye.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TypeEmploye)) {
            return false;
        }
        TypeEmploye other = (TypeEmploye) object;
        if ((this.idTypeEmploye == null && other.idTypeEmploye != null) || (this.idTypeEmploye != null && !this.idTypeEmploye.equals(other.idTypeEmploye))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "org.orderoid.ejb.domain.TypeEmploye[ idTypeEmploye=" + idTypeEmploye + " ]";
    }
    
}
